package com.sphd.beautysalon.presenter;


import com.android.volley.VolleyError;
import com.sphd.beautysalon.model.AddManagerModelImpl;
import com.sphd.beautysalon.view.AddManagerView;

/**
 * Created by Hu on 2016/11/09
 */

public class AddManagerPresenterImpl implements AddManagerPresenter {
    AddManagerModelImpl addManagerModel;
    AddManagerView addManagerView;

    public AddManagerPresenterImpl(AddManagerView addManagerView) {
        this.addManagerView = addManagerView;
        addManagerModel=new AddManagerModelImpl();
    }

    @Override
    public void addData(String url) {
        addManagerView.showLoading();
            addManagerModel.senUrl(url,this);
    }

    @Override
    public void sendError(VolleyError error) {
        addManagerView.dissLoading();
    }

    @Override
    public void sendRes(int res) {
        addManagerView.recres(res);
        addManagerView.dissLoading();
    }
}